home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / Utilities / Ghostscript / src / gdevdljm.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-01-01  |  5.7 KB  |  163 lines

  1. /* Copyright (C) 2000 Aladdin Enterprises.  All rights reserved.
  2.  
  3.    This program may be distributed as part of AFPL Ghostscript, under the
  4.    terms of the Aladdin Free Public License (the "License").
  5.  
  6.    AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No
  7.    author or distributor accepts any responsibility for the consequences of
  8.    using it, or for whether it serves any particular purpose or works at
  9.    all, unless he or she says so in writing.  Refer to the License for full
  10.    details.
  11.  
  12.    Every copy of AFPL Ghostscript must include a copy of the License,
  13.    normally in a plain ASCII text file named PUBLIC.  The License grants you
  14.    the right to copy, modify and redistribute AFPL Ghostscript, but only
  15.    under certain conditions described in the License.  Among other things,
  16.    the License requires that the copyright notice and this notice be
  17.    preserved on all copies.
  18.  
  19.    This program may also be distributed and/or modified under the terms of
  20.    the GNU General Public License as published by the Free Software
  21.    Foundation (the "GPL"); either version 2 of the GPL, or (at your option)
  22.    any later version.
  23.  
  24.    When distributed under the terms of the GPL, this program is distributed
  25.    in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
  26.    even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  27.    PURPOSE.  See the GPL for more details.
  28.  
  29.    If this program is being distributed under the terms of the GPL, you
  30.    should have received a copy of the GPL along with this program, normally
  31.    in a plain ASCII text file named COPYING; if not, write to the Free
  32.    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111
  33.    U.S.A.
  34.  */
  35.  
  36. /*$Id: gdevdljm.h,v 1.4 2000/09/19 19:00:12 lpd Exp $ */
  37. /* Interface to generic monochrome H-P DeskJet/LaserJet driver */
  38.  
  39. #ifndef gdevdljm_INCLUDED
  40. #  define gdevdljm_INCLUDED
  41.  
  42. #include "gdevpcl.h"
  43.  
  44. /*
  45.  * The notion that there is such a thing as a "PCL printer" is a fiction: no
  46.  * two "PCL" printers, even at the same PCL level, have identical command
  47.  * sets.  (The H-P documentation isn't fully accurate either; for example,
  48.  * it doesn't reveal that the DeskJet printers implement anything beyond PCL
  49.  * 3.)
  50.  *
  51.  * This file contains feature definitions for a generic monochrome PCL
  52.  * driver (gdevdljm.c), and the specific feature values for all such
  53.  * printers that Ghostscript currently supports.
  54.  */
  55.  
  56. /* Printer spacing capabilities.  Include at most one of these. */
  57. #define PCL_NO_SPACING   0    /* no vertical spacing capability, must be 0 */
  58. #define PCL3_SPACING     1    /* <ESC>*p+<n>Y (PCL 3) */
  59. #define PCL4_SPACING     2    /* <ESC>*b<n>Y (PCL 4) */
  60. #define PCL5_SPACING     4    /* <ESC>*b<n>Y and clear seed row (PCL 5) */
  61. /* The following is only used internally. */
  62. #define PCL_ANY_SPACING\
  63.   (PCL3_SPACING | PCL4_SPACING | PCL5_SPACING)
  64.  
  65. /* Individual printer properties.  Any subset of these may be included. */
  66. #define PCL_MODE_2_COMPRESSION       8    /* compression mode 2 supported */
  67.                     /* (PCL 4) */
  68. #define PCL_MODE_3_COMPRESSION      16    /* compression modes 2 & 3 supported */
  69.                     /* (PCL 5) */
  70. #define PCL_END_GRAPHICS_DOES_RESET 32    /* <esc>*rB resets all parameters */
  71. #define PCL_HAS_DUPLEX              64    /* <esc>&l<duplex>S supported */
  72. #define PCL_CAN_SET_PAPER_SIZE     128    /* <esc>&l<sizecode>A supported */
  73. #define PCL_CAN_PRINT_COPIES       256  /* <esc>&l<copies>X supported */
  74.  
  75. /* Shorthands for the most common spacing/compression combinations. */
  76. #define PCL_MODE0 PCL3_SPACING
  77. #define PCL_MODE0NS PCL_NO_SPACING
  78. #define PCL_MODE2 (PCL4_SPACING | PCL_MODE_2_COMPRESSION)
  79. #define PCL_MODE2P (PCL_NO_SPACING | PCL_MODE_2_COMPRESSION)
  80. #define PCL_MODE3 (PCL5_SPACING | PCL_MODE_3_COMPRESSION)
  81. #define PCL_MODE3NS (PCL_NO_SPACING | PCL_MODE_3_COMPRESSION)
  82.  
  83. /* Parameters for the printers we know about. */
  84.  
  85.      /* H-P DeskJet */
  86. #define PCL_DJ_FEATURES\
  87.   (PCL_MODE2 |\
  88.    PCL_END_GRAPHICS_DOES_RESET | PCL_CAN_SET_PAPER_SIZE)
  89.  
  90.      /* H-P DeskJet 500 */
  91. #define PCL_DJ500_FEATURES\
  92.   (PCL_MODE3 |\
  93.    PCL_END_GRAPHICS_DOES_RESET | PCL_CAN_SET_PAPER_SIZE)
  94.  
  95.      /* Kyocera FS-600 */
  96. #define PCL_FS600_FEATURES\
  97.   (PCL_MODE3 |\
  98.    PCL_CAN_SET_PAPER_SIZE | PCL_CAN_PRINT_COPIES)
  99.  
  100.      /* H-P original LaserJet */
  101. #define PCL_LJ_FEATURES\
  102.   (PCL_MODE0)
  103.  
  104.      /* H-P LaserJet Plus */
  105. #define PCL_LJplus_FEATURES\
  106.   (PCL_MODE0)
  107.  
  108.      /* H-P LaserJet IIp, IId */
  109. #define PCL_LJ2p_FEATURES\
  110.   (PCL_MODE2P |\
  111.    PCL_CAN_SET_PAPER_SIZE)
  112.  
  113.      /* H-P LaserJet III* */
  114. #define PCL_LJ3_FEATURES\
  115.   (PCL_MODE3 |\
  116.    PCL_CAN_SET_PAPER_SIZE | PCL_CAN_PRINT_COPIES)
  117.  
  118.      /* H-P LaserJet IIId */
  119. #define PCL_LJ3D_FEATURES\
  120.   (PCL_MODE3 |\
  121.    PCL_HAS_DUPLEX | PCL_CAN_SET_PAPER_SIZE | PCL_CAN_PRINT_COPIES)
  122.  
  123.      /* H-P LaserJet 4 */
  124. #define PCL_LJ4_FEATURES\
  125.   (PCL_MODE3 |\
  126.    PCL_CAN_SET_PAPER_SIZE | PCL_CAN_PRINT_COPIES)
  127.  
  128.      /* H-P LaserJet 4d */
  129. #define PCL_LJ4D_FEATURES\
  130.   (PCL_MODE3 |\
  131.    PCL_HAS_DUPLEX | PCL_CAN_SET_PAPER_SIZE | PCL_CAN_PRINT_COPIES)
  132.  
  133.      /* H-P 2563B line printer */
  134. #define PCL_LP2563B_FEATURES\
  135.   (PCL_MODE0NS |\
  136.    PCL_CAN_SET_PAPER_SIZE)
  137.  
  138.      /* OCE 9050 line printer */
  139. #define    PCL_OCE9050_FEATURES\
  140.   (PCL_MODE3NS |\
  141.    PCL_CAN_SET_PAPER_SIZE)
  142.  
  143. /* ---------------- Procedures ---------------- */
  144.  
  145. /* Send a page to the printer. */
  146. int dljet_mono_print_page(P5(
  147.     gx_device_printer * pdev,    /* from device-specific _print_page */
  148.     FILE * prn_stream,        /* ibid. */
  149.     int dots_per_inch,        /* may be a multiple of y resolution */
  150.     int features,            /* as defined above */
  151.     const char *page_init        /* page initialization string */
  152.                  ));
  153. int dljet_mono_print_page_copies(P6(
  154.     gx_device_printer * pdev,
  155.     FILE * prn_stream,
  156.     int num_copies,
  157.     int dots_per_inch,
  158.     int features,
  159.     const char *page_init
  160.                  ));
  161.  
  162. #endif /* gdevdljm_INCLUDED */
  163.